﻿using PatternLib.Responsibility;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace PatternLib
{
    public class ChainBuilder
    {
        public static void Create(ResponsibilityNode node)
        {
            ResponsibilityChain firstStep = new FirstStep();

            ResponsibilityChain director = new Director();
            ResponsibilityChain manager = new Manager();
            ResponsibilityChain ceo = new CEO();

            firstStep.AddNextStep(director);
            director.AddNextStep(manager);
            manager.AddNextStep(ceo);

            firstStep.Execute(node);
        }
    }
}
